<layout name="page" />
<block name="content">
	<input type="hidden" name="ajax" id="ajax" value="1">
	{:widget('page_header/simple',array('name'=>'新建客户'))}
	<div class="frame">
		<form method='post' id="form_data" class="row">
			<input type="hidden" name="opmode" value="add">				
			<div class="box col-6">
				<label class="input-label" for="name">公司名称*：</label>
				<input class="input" type="text" id="name" name="name" check="required" info="请输入姓名">
			</div>
			<div class="box col-6">
				<label class="input-label" for="short">公司简称：</label>
				<input class="input" type="text" id="short" name="short" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="biz_license">证件号码：</label>
				<input class="input" type="text" id="biz_license" name="biz_license">
			</div>

			<div class="box col-6">
				<label class="input-label" for="payment">付款方式：</label>
				<input class="input" type="text" id="payment" name="payment" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="address">地址：</label>
				<input class="input" type="text" id="address" name="address" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="salesman">业务员：</label>
				<input class="input" type="text" id="salesman" name="salesman" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="contact">联系人：</label>
				<input class="input" type="text" id="contact" name="contact">
			</div>
			<div class="box col-6">
				<label class="input-label" for="email">邮箱：</label>
				<input class="input" type="text" id="email" name="email">
			</div>
			<div class="box col-6">
				<label class="input-label" for="office_tel">办公电话：</label>
				<input class="input" type="text" id="office_tel" name="office_tel">
			</div>
			<div class="box col-6">
				<label class="input-label" for="mobile_tel">手机：</label>
				<input class="input" type="text" id="mobile_tel" name="mobile_tel" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="fax">传真：</label>
				<input class="input" type="text" id="fax" name="fax" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="im">即时聊天：</label>
				<input class="input" type="text" id="im" name="im" >
			</div>
			<div class="box col-12">
				<label class="input-label" for="remark" >其他：</label>
				<textarea class="textarea" name="remark" rows="5" class="col-xs-12" ></textarea>
			</div>
			<div class="box col-12">
				<label class="input-label" for="remark" ></label>
				<a class="btn btn-normal" onclick="save()">保存</a>
				<a  class="btn btn-return" onclick="go_return_url();">取消</a>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;
			var fn = {
				save : function() {
					send_form("form_data", "{:url('save')}", "{:url('index')}", function(ret) {
						if (ret.status) {
							layer.msg(ret.info, {
								time : 1200
							}, function() {
								location.href = "{:url('index')}";
							});
						} else {
							layer.msg(ret.info);
							return false;
						}
					});
				},
			};
			win_exp(fn);
		});
	</script>
</block>